<template>
  <div id="app">
    <h1>{{count}}</h1>
    <!-- <h5>{{myCount}}</h5> -->
    <HelloWorld />
    <router-view/>
  </div>
</template>

<script>
import { mapState,mapGetters } from "vuex";
const HelloWorld = () => import('./components/HelloWorld');

export default {
  computed:{
    // ...mapGetters(['myCount']),
    // ...mapState(['count'])
    ...mapState({
      count:state=>{
        return state.app.count
      }
    }),
    ...mapGetters({
      myCount:state=>{
        return state.app.myCount
      }
    })
  },
  components:{
    HelloWorld
  }
};
</script>


<style lang="less">
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
